A virtual tape system is a tape management system such as a special storage device or group of devices and software which manages data such that the data appears to be stored entirely on data storage cartridges when portions of the data may actually be located in faster, hard disk storage. Programming for a virtual tape system is sometimes referred to as virtual tape server (VTS), although these terms may be used interchangeably, unless otherwise specifically indicated. A virtual tape system may be used with hierarchical storage management (HSM) system in which data is moved as the data falls through various usage thresholds to slower but less costly forms of storage media. A virtual tape system may also be used as part of a storage area network (SAN) where less-frequently used or archived data can be managed by a single virtual tape server for a number of networked computers.
Virtual tape storage subsystems, such as International Business Machines (IBM®) Magstar Virtual Tape Server, comprise at least one virtual tape server (VTS) coupled to a tape library comprising numerous tape drives and data storage cartridges. The VTS is also coupled to a direct access storage device (DASD), comprised of numerous interconnected hard disk drives.
The DASD functions as a tape volume cache (TVC) of the VTS subsystem. When using a VTS, the host application writes tape data to virtual drives. The volumes written by the host system are physically stored in the tape volume cache (e.g., a RAID disk buffer) and are called virtual volumes. The storage management software within the VTS copies the virtual volumes in the TVC to the physical cartridges owned by the VTS subsystem. Once a virtual volume is copied or migrated from the TVC to tape, the virtual volume is then called a logical volume. As virtual volumes are copied from the TVC to a Magstar cartridge (tape), they are copied on the cartridge end to end, taking up only the space written by the host application. This arrangement maximizes utilization of a cartridge storage capacity.
The storage management software manages the location of the logical volumes on the physical cartridges, and the customer has no control over the location of the data. When a logical volume is copied from a physical cartridge to the TVC, the process is called recall and the volume becomes a virtual volume again. The host cannot distinguish between physical and virtual volumes, or physical and virtual drives. Thus, the host treats the virtual volumes and virtual drives as actual cartridges and drives and all host interaction with tape data in a VTS subsystem is through virtual volumes and virtual tape drives.
Before data can be copied from the TVC to the cartridge or read from the cartridge back to the TVC, the VTS system must communicate with the physical library to mount the cartridge to a drive. After the cartridge has been mounted, the VTS system does not immediately navigate to the desired tape position and start writing new data or recalling logical volumes. The complexities of modern automated physical libraries with a mixture of tape drives and data storage cartridges can not guarantee the correct cartridge has been mounted to the requested drive. The VTS subsystem is the final line of defense for the protection of customer data. If data is written to the wrong cartridge, this results in not being able to recall logical volumes to the TVC and even overwriting active data. If data is simply read from the desired tape position, it could be the wrong data. The bottom line is that the VTS subsystem must have a method to ensure the mounted cartridge is the correct cartridge (label verification or label check).
Although the VTS subsystem virtualizes the location of the customer data, the VTS must still manage the physical resource layer consisting of a plurality of physical cartridge types and drive types in the attached automated physical library.
All physical cartridges in the library should have an external label (e.g. a bar code label) that is operator readable and/or machine readable. The label identifies the volume serial number (herein referred to as the VOLSER) of the cartridge and is used to identify the cartridge to the physical library. All communication with the control program relating to a specific cartridge uses the volser that is read from the external bar code label. The external bar code label also contains 1 or 2 character(s) to identify the cartridge type (media type).
The VTS subsystem and other host systems have adhered to a simple but a strict rule when writing data to or reading data from a cartridge. The first time a cartridge is inserted into the physical library, the front of the tape must be pre-labeled with a standard label containing a VOL1 record, HDR1 record, HDR2 record, and a tape mark. The VOL1 record contains the equivalent of the external label. This internally written label is herein referred to as the BOT (Beginning of Tape) label. When the cartridge is needed, the VTS subsystem mounts it to a supported drive. The VTS system first rewinds the mounted cartridge to the beginning of the tape. Then it verifies the validity of the mounted physical cartridge by reading the BOT label from the cartridge and comparing the BOT label with the external label of the cartridge it believes is mounted. If the VTS system could not read the BOT label from the cartridge, it would stop using the cartridge. If the BOT label is readable and matches the external label, the VTS system can now write new data to or read data from the mounted cartridge. Every time the cartridge is mounted, the cartridge has to be rewound to perform the label check.
This cartridge label verification method is effective but inefficient and inflexible. It is inefficient because the label verification is always at the beginning of tape, thus the cartridge has to be rewound on every mount. Furthermore, although the algorithms in HSM attempt to group the processing of logical volumes in relational chains, such that all the logical volumes in a particular chain exist on the same physical volume, to optimize the speed at which data is being copied to or recalled from tape, the fact that each mount requires having to re-navigate to the last block written is inefficient. It is inflexible as it is a requirement that new cartridges inserted into the subsystem must be pre-labeled in a data format readable to that subsystem.